module.exports = app => {
    const mongoose = require('mongoose')
    mongoose.connect('mongodb://localhost:27017/salaryApp', {
        useNewUrlParser: true,
        useUnifiedTopology: true,
        useCreateIndex: true,
        useFindAndModify: false
    }, function (err) {
        if (err) {
            console.log(err)
            return;
        }
        console.log('数据库连接成功')
    })
    require('require-all')(__dirname + '/../models')

}